package problems;

import lib.MathLib;

public class Euler025 extends AbstractEuler {

	@Override
	public Number calculate() {
		//there are 4 or 5 fibonacci numbers of each length d > 1, so the answer must be between 4000 and 5000
		for (int length = 0, n = 4000; n <= 5000; n++, length = MathLib.fibo(n).toString().length()) {
			if (length == 1000) return n;
		}
		return null; //not possible
	}

	@Override
	protected Number getCorrectAnswer() {
		return 4782;
	}

}
